#ifndef __TRIMMER__
#define __TRIMMER__


#include <string>


// the enums are defined in the class and not at global scope
//    since such a way it is simpler to find which class caused what status


class trimmer{

 public:
  trimmer();
  virtual ~trimmer(){};

  enum stripMode { FRONT = 0, //
                   BACK, //
                   BOTH };

  enum exitStatus { UNDEFINED = 0, //
                    EMPTY_INPUT,  //
                    WRONG_DIRECTION, //
                    FRONT_DIRECTION, //
                    BACK_DIRECTION, //
                    BOTH_DIRECTION };


  std::string trim( std::string line, trimmer::stripMode direction=FRONT );
  exitStatus getStatus() { return m_outputStatus; };

 private:
  exitStatus m_outputStatus;
  std::string leftTrim( std::string line );
  std::string rightTrim( std::string line );

};




#endif   //   __TRIMMER__
